<?php

if($sf_user->isAuthenticated())
{
if($sf_user->isAuthenticated())
{
  echo _tag('p', __('Welcome %username%', array('%username%' => $sf_user->getUsername())));
  echo _tag('p', _link('@signout')->text('Logout'));
  return;
}
}

echo $form->open('.dm_signin_form action=@signin');

echo _tag('ul.dm_form_elements',

  _tag('li.dm_form_element', $form['username']->label()->field()->error()).

  _tag('li.dm_form_element', $form['password']->label()->field()->error()).

  _tag('li.dm_form_element', $form['remember']->label()->field()->error())

);

echo $form->renderHiddenFields();

echo _tag('div.submit2',$form->submit(__('Signin')));

echo $form->close();